<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html">

    <body>

        <ui:composition template="./template/layout.xhtml">
            <ui:define name="left">
            <p:menu>
                    <p:submenu label="Albums">
                        <ui:repeat value="#{gallery.albums}" var="album">
                            <p:menuitem label="#{album.name}"/>
                        </ui:repeat>
                        <p:menuitem  label="Add an album">
                            <h:link outcome="album" value="Add an album"/>
                        </p:menuitem>
                    </p:submenu>
                    <p:submenu label="#{gallery.photographer}">

                        <p:menuitem url="mailto:#{gallery.photographer.emailAddress}" label="#{gallery.photographer.emailAddress}"/>
                        <p:menuitem url="skypeto:#{gallery.photographer.phoneNumber}" label="#{gallery.photographer.phoneNumber}"/>


                    </p:submenu>


                </p:menu>
            </ui:define>

            <ui:define name="top">
                top
            </ui:define>


            <ui:define name="content">
                <ui:repeat value="gallery.covers" var="cover">
                    <p:graphicImage value="cover.name" />
                </ui:repeat>

                
            </ui:define>

            <ui:define name="bottom">
                bottom
            </ui:define>

        </ui:composition>

    </body>
</html>
